﻿using Amazon.S3;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ken.Services
{
    public class AWSError
    {
        private static string resourcePattern = String.Empty;
        public static string RESOURCE_PATTERN
        {
            get
            {
                if (String.IsNullOrEmpty(resourcePattern))
                    resourcePattern = typeof(AWSError).FullName + ".{0}";
                return resourcePattern;
            }
        }

        public static string GetErrorMessage(AmazonS3Exception amazonException)
        {
            return String.Format(resourcePattern, amazonException.ErrorCode);
        }
    }
}
